import type {Patient,PatientList } from '@/types/user'
import { request } from '@/utils/request'

// 获取患者列表信息
export const getPatientList = () => request<PatientList>('patient/mylist')

// 添加患者
export const addPatient = (patient: Patient) =>
  request('patient/add', 'POST', patient)

// 编辑患者
export const editPatient = (patient: Patient) =>
  request('patient/update', 'PUT', patient)

// 删除患者
export const delPatient = (id: string) => request(`patient/del/${id}`, 'DELETE')